package cn.shengchao.controler.system;

import cn.dev33.satoken.annotation.SaIgnore;
import cn.shengchao.examstar.system.acl.ports.repostories.IXcxSettingsRepository;
import cn.shengchao.examstar.system.infrastructure.dao.po.TXcxSettings;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
@CrossOrigin("${project.cross-origin}")
@RequestMapping("/api/${project.version}/xcx/system")
public class XcxSystemController {

    @Autowired
    private IXcxSettingsRepository iXcxSettingsRepository;

    @SaIgnore
    @RequestMapping("/settings")
    public TXcxSettings getXcxSettings(String appid, String version) {
        return iXcxSettingsRepository.getXcxSettings(appid, version);
    }

}
